﻿using HardcoreGame.Content.Projectiles.Javelin;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria;

namespace HardcoreGame.Content.Items.Weapons.Ranged.Javelin
{
    public class SilverJavelin : ModItem
    {
        public override void SetStaticDefaults()
        {
            Item.ResearchUnlockCount = 99;
        }

        public override void SetDefaults()
        {
            Item.shootSpeed = 9.5f;
            Item.damage = 15;
            Item.knockBack = 4f;
            Item.useStyle = ItemUseStyleID.Swing;
            Item.useAnimation = 30;
            Item.useTime = 30;
            Item.width = 30;
            Item.height = 30;
            Item.maxStack = Item.CommonMaxStack;
            Item.rare = ItemRarityID.White;
            Item.consumable = true;
            Item.noUseGraphic = true;
            Item.noMelee = true;
            Item.autoReuse = true;
            Item.DamageType = DamageClass.Ranged;
            Item.UseSound = SoundID.Item1;
            Item.value = 90;
            Item.shoot = ModContent.ProjectileType<SilverJavelinProj>();
        }

        public override void AddRecipes()
        {
            CreateRecipe(50)
            .AddIngredient(ItemID.SilverBar, 1)
            .AddTile(TileID.Anvils)
            .Register();
        }
    }
}
